<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/7/20
  Time: 20:45
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head>
    <title>学生管理系统首页</title>
  </head>
  <body>
  <%--
  获取会话域中的数据
  如果获取到了 显示添加和查看功能的超链接
  反之 显示登录功能的超链接
  --%>
  <% Object username = session.getAttribute("username");
      if (username == null) {
        %>
  <a href="/stu1/login.jsp">请登陆</a>
  <%} else {%>
        <a href="/stu1/addStudent.jsp">添加学生</a>
            <a href="/stu1/listStudentServlet">查看学生</a>
  <%}%>
  </body>
</html>
